<!DOCTYPE html>
<?php
//print_r($page);
?>
<html lang="en">
	<head>
		<link rel="stylesheet" href="<?php echo base_url(); ?>res/css/bootstrap.min.css">
		<?php echo $map['js']; ?>
	</head>
	<body>

		<div class="container">
			<div  class="page-header">
				<h3><?php echo (!empty($udd))?'Edit UDD':'Tambah UDD'; ?></h3>
				<br/>
			</div>
		</div>
		<div class="container">
			<?php
			$action = base_url() . 'index.php/main/dotambahudd';
			if (!empty($udd)) {
				$action = base_url() . 'index.php/main/doeditudd';

			}
			?>
			
			<form class="form-horizontal" method="post" role="form" action="<?php echo $action; ?>">
				<?php
				if (!empty($udd)) {
					echo '<input type="hidden" name="id_udd" value="' . $udd['id_udd'] . '"/>';
				}
				?>
				
				<div class="form-group">
					<label class="col-sm-2 control-label">UDD</label>
					<div class="col-sm-6">
						<input type="text" class="form-control" placeholder="Nama UDD" name="udd" value="<?php echo (!empty($udd['udd']))?$udd['udd']:'' ?>">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">Alamat</label>
					<div class="col-sm-6">
						<input type="text" class="form-control" placeholder="Alamat" name="alamat" value="<?php echo (!empty($udd['alamat']))?$udd['alamat']:'' ?>">
					</div>
				</div>
				<div class="form-group">
					<label  class="col-sm-2 control-label">Telepon</label>
					<div class="col-sm-6">
						<input type="text" class="form-control" placeholder="Telepon" name="telepon"  value="<?php echo (!empty($udd['telepon']))?$udd['telepon']:'' ?>">
					</div>
				</div>
				<div class="form-group">
					<label  class="col-sm-2 control-label">Long, Lat</label>
					<div class="col-sm-3">
						<input type="text" class="form-control" placeholder="Lat" name="lat" value="<?php echo (!empty($udd['lat']))?$udd['lat']:'' ?>">
					</div>
					<div class="col-sm-3">
						<input type="text" class="form-control" placeholder="Long" name="long" value="<?php echo (!empty($udd['long']))?$udd['long']:'' ?>">
					</div>
				</div>
				<div class="form-group">
					<label  class="col-sm-2 control-label"></label>
					<div class="col-sm-8">
						<?php echo $map['html']; ?>
					</div>
				</div>
				<div class="form-group">
					<button type="submit" class="btn btn-default">Submit</button>
				</div>
				
				
			</form>
		</div>
	</body>
</html>